<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>applicationScope</title>
</head>
<body>
	<h1>application의 Scope</h1>
	<p>application객체는 서버구동시 생성, 서버가 닫힐때 소멸됩니다.</p>
<%
	if(application.getAttribute("count")==null)
	{%><div>처음으로 방문</div>
	<%
		application.setAttribute("count", 1);

	}
	else
	{
		int c = Integer.parseInt(application.getAttribute("count").toString());
		c++;
		application.setAttribute("count", c);
	%>
		<div> <%=c %>번째 방문객입니다.</div>
	
	
	<%
		
			
	}
%>
	
		
	

</body>
</html>